home *** CD-ROM | disk | FTP | other *** search
/ PC Answers 1998 January / PC Answers Issue 49 Cover CD January 1998.iso / Apps / Director / DATA.Z / Widget Wizard.dir / WidgtBehaviors_45_Video FFwd.ls < prev    next >
Encoding:
Text File  |  1997-05-10  |  2.0 KB  |  68 lines

  1. property VideoSprite, DownCM, UpCM, DownNum, UpNum, button_active
  2.  
  3. on beginSprite me
  4.   set the UpCM of me to the member of sprite the spriteNum of me
  5.   set the UpNum of me to the number of member UpCM
  6.   set the DownNum of me to the number of member DownCM
  7.   set the button_active of me to 0
  8.   puppetSprite(the spriteNum of me, 1)
  9. end
  10.  
  11. on endSprite me
  12.   puppetSprite(the spriteNum of me, 0)
  13. end
  14.  
  15. on mouseDown me
  16.   global movieMe
  17.   set the member of sprite the spriteNum of me to DownNum
  18.   set the button_active of me to 1
  19.   set movieMe to the movieRate of sprite the VideoSprite of me
  20.   set the movieRate of sprite the VideoSprite of me to 10
  21. end
  22.  
  23. on mouseUp me
  24.   global movieMe
  25.   set the member of sprite the spriteNum of me to UpNum
  26.   set the button_active of me to 0
  27.   set the movieRate of sprite the VideoSprite of me to movieMe
  28. end
  29.  
  30. on mouseUpOutSide me
  31.   set the button_active of me to 0
  32. end
  33.  
  34. on mouseLeave me
  35.   if the button_active of me then
  36.     set the member of sprite the spriteNum of me to UpNum
  37.   end if
  38. end
  39.  
  40. on mouseEnter me
  41.   if the button_active of me then
  42.     set the member of sprite the spriteNum of me to DownNum
  43.   end if
  44. end
  45.  
  46. on getPropertyDescriptionList
  47.   set description to [:]
  48.   if the currentSpriteNum = 0 then
  49.     set memdefault to 0
  50.   else
  51.     set memref to the member of sprite the currentSpriteNum
  52.     set castLibNum to the castLibNum of memref
  53.     set memdefault to member (the memberNum of member memref + 1) of castLib castLibNum
  54.   end if
  55.   addProp(description, #VideoSprite, [#comment: "Video Sprite:", #format: #integer, #default: the currentSpriteNum + 2])
  56.   addProp(description, #DownCM, [#default: memdefault, #format: #bitmap, #comment: "Pict for Down:"])
  57.   return description
  58. end
  59.  
  60. on getBehaviorDescription
  61.   return "Invokes the Fast Fwd  function for a digital video sprite. Attach to a Pushbutton with the appropriate label." & RETURN & "PARAMETERS:" & RETURN & "ΓÇó Video Sprite - number of the sprite channel in which the video is displayed."
  62. end
  63.  
  64. on getAssocMembers
  65.   set myPropList to [DownCM]
  66.   return myPropList
  67. end
  68.